package com.mazaiting.socket.server.entity;

import java.nio.channels.SocketChannel;

/**
 * NIO 请求实体
 *
 * @author mazaiting
 * @create_time 2022/4/18 18:37
 */
public class NioRequest {
    /**
     * 服务器配置
     */
    private ServerConfig config;
    /**
     * 通道
     * {@link SocketChannel}
     */
    private SocketChannel channel;
    /**
     * 请求数据
     */
    private String data;

    public NioRequest(ServerConfig config, SocketChannel channel, String data) {
        this.config = config;
        this.channel = channel;
        this.data = data;
    }

    public ServerConfig getConfig() {
        return config;
    }

    public void setConfig(ServerConfig config) {
        this.config = config;
    }

    public SocketChannel getChannel() {
        return channel;
    }

    public void setChannel(SocketChannel channel) {
        this.channel = channel;
    }

    public String getData() {
        return data;
    }

    public void setData(String data) {
        this.data = data;
    }
}
